<?php
$this->breadcrumbs = array(
    'Looking For Jobs' => "index.php?lang={$lang}&r=Jobs/List",
    'Job Detail'
);
?>
<h1>Job Detail</h1>
<div class="alert alert-block">
    <img src="images/briefcase.png">
    <b><span><?= $jobDetail['Position'] ?></span>
        <span class="pull-right">Job ID : <?= $jobDetail['JobID'] ?></span></b>
</div>
<table class="table table-bordered">
    <tbody>
        <tr><td class="rowheader">Location:</td><td><?= $jobDetail['ProvinceNAME'] ?></td></tr>
        <tr><td class="rowheader">Gender:</td><td><?= $jobDetail['Sex'] == 'M' ? 'Male' : ($jobDetail['Sex'] == 'F' ? 'Female' : 'Undefined') ?></td></tr>
        <tr><td class="rowheader">Age:</td><td><?= $jobDetail['Age'] ?> <?= $lang == 'en'?'year':'ปี' ?></td></tr>
        <tr><td class="rowheader">Experience:</td><td><?= $jobDetail['Exp'] ?> <?= $lang == 'en'?'year':'ปี' ?></td></tr>
        <tr><td class="rowheader">Salary:</td><td><?= $jobDetail['Salary'] ?> <?= $lang == 'en'?'bath':'บาท' ?></td></tr>
        <tr><td class="rowheader">Descript:</td><td><?= $jobDetail['Descript'] ?></td></tr>
    </tbody>
</table>
<p class="text-center">
    <a href="index.php?lang=<?= $lang ?>&r=Jobseeker/RegisterForm&jobID=<?= $jobDetail['JobID'] ?>" class="btn btn-large btn-primary" style="color: #fff;">
        <i class="icon-pencil"></i> Apply Now
    </a>
</p>
<script>
    $(function(){
        //fill '-' cell(td)empty
        $('td').each(function(){
            if($(this).text()==''){
                $(this).text('-');
            }
        });
    });
</script>